package com.zhiwei.fast.fragments

import android.os.Bundle
import androidx.fragment.app.DialogFragment
import com.zhiwei.fast.databinding.FragmentDialogSimpleBinding
import com.zhiwei.fast.fragments.dialog.SimpleDialogFragment
import com.zhiwei.fast.fragments.models.DialogFragmentSimpleViewModel
import com.zhiwei.most.base.fragment.BaseVmVbFragment
import com.zhiwei.most.dialog.DialogLayoutCallback
import com.zhiwei.most.ext.onClickRxView

/**
 * Create by zhiweizhu on 2022/3/4
 */
class DialogFragmentSimple: BaseVmVbFragment<DialogFragmentSimpleViewModel, FragmentDialogSimpleBinding>() {

    override fun initView(savedInstanceState: Bundle?) {
        with(mViewBind){
            showDialog.onClickRxView {
                SimpleDialogFragment(
                    requireContext(),
                    object : DialogLayoutCallback{
                        override fun onCancel(dialog: DialogFragment?) {
                            dialog?.dismiss()
                        }

                        override fun onDismiss(dialog: DialogFragment?) {
                            dialog?.dismiss()
                        }
                    }
                ).showDialog()
            }
        }
    }

    override fun lazyLoadData() {
        
    }

    override fun createObserver() {
        
    }
}